;Parallel Analysis in ViSta
;by Rubén Ledesma and Pedro Valero Mora
;e-mail rdledesma@gmail.com

;STEP 1: DEFINE THE SIX LOCAL VARIABLES 

(let ((plugin-constructor-filename  
       (strcat *plugin-path* "pa" separator "pa-analysis"))
      (menu-item-title "Parallel Analysis")
      (tool-name "PA")
      (model-prefix "PA")
      (ok-data-types '("multivariate" "numeric" ))
      (ok-variable-types '(numeric))
      )

;STEP 2: INSTALL THE PLUGIN ENVIRONMENT

  (send *vista* :install-plugin tool-name menu-item-title ok-data-types)
  
;STEP 3: DEFINE THE LOADER FUNCTION

  (defun parallel-analysis 
    (&key
     (data   *current-data*)
     (title  menu-item-title)
     (name   (strcat model-prefix "-" (send *current-data* :name)))
     (dialog nil))
    
    (send pa-model-object-proto :new
          menu-item-title tool-name model-prefix ok-data-types 
          data title name dialog ok-variable-types)
    ) ;end of constructor loader function
 
;STEP 4: LOAD THE PLUGIN CODE

  (load plugin-constructor-filename)
  
  ) ;end of let statement
